/**
 * 
 */
package references2bibtexrcp.command;

import java.io.File;
import java.net.URL;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;

/**
 * @author v
 *
 */
public class HelpCommand extends AbstractHandler {

	/* (non-Javadoc)
	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
	 */
	@Override
	public Object execute(ExecutionEvent event) throws ExecutionException {
		try {
			File file = new File("page/page.html");
			
			PlatformUI.getWorkbench().getBrowserSupport().createBrowser(	
					IWorkbenchBrowserSupport.AS_EDITOR, "Help", "Help", "") 
					.openURL(new URL("file:" + file.getAbsolutePath()));
			
		} catch (Exception e) {
		} 
		
        return null;
	}

}
